<cfset id = URLDecode( Decrypt( url.del, client.ek ) ) >

<cfset ok = 1>
<cftransaction action="begin">
	<cftry>
        
        <cfquery name="delHist" datasource="#client.company_dsn#">
            DELETE FROM CINWSHISTORY
            WHERE WSDOCNUMBER = '#ID#'
        </cfquery>
        <cfquery name="delPerson" datasource="#client.company_dsn#">
            DELETE FROM CINWSFILEperson
            WHERE WSFILENO ='#ID#'
        </cfquery>
        <cfquery name="del" datasource="#client.company_dsn#">
            DELETE FROM CINWSFILE
            WHERE DOCNUMBER = '#ID#'
        </cfquery>
        
    
        <cfcatch>
            <cfset ok = 0>
            <CFSET client.err = "#cfcatch.Detail#">
        </cfcatch>
    </cftry>
    
	 <cfif ok>
        <cftransaction action="commit">
        <cfset client.err = url.name&" Successfully deleted.">
     <cfelse>
        <cftransaction action="rollback">
     </cfif>
 
 	<cflocation url="#client.domain#eworksched/manning/index.cfm" addtoken="no">
</cftransaction>



